<?php

namespace App\Models;

class UserKnowledge extends Model
{
    protected $table = 'user_knowledge';


    public function scopeOfUserKnowledge($query, $userId, $knowledgeId)
    {
        return $query->where('user_id', $userId)->where('knowledge_id', $knowledgeId);
    }

    public function scopeOfTagKnowledge($query, $userId, $tagId)
    {
        return $query->where('user_id', $userId)->where('tag_id', $tagId);
    }



    public function setUserId($userId)
    {
        return $this->user_id = $userId;
    }

    public function setKnowledgeId($knowledgeId)
    {
        return $this->knowledge_id = $knowledgeId;
    }

    public function setTagId($tagId)
    {
        return $this->tag_id = $tagId;
    }
}
